home *** CD-ROM | disk | FTP | other *** search
- nroff 1.2.1/man 3.0.1/manpager 1.44 notes
- -----------------------------------------
-
- This version of nroff has been ported/compiled with GNU C v1.40 with MiNT
- libc at PL 19. It should run under TOS, though I only use MiNT (thanx, eric).
- The big advantages are: more portable and much faster than alcyon verison.
- nroff is -mshort (16 bit). man and manpager have also been ported to gcc.
-
- Files here are:
-
- xnroff.ttp new version 1.2.1 (text formatter)
- man.ttp new version 3.0.1 (manual front end)
- manpager.ttp new version 1.44 (alternate to less(1) that understands
- nroff -T output) NOTE: ONLY WORKS ON MONOCHROME AND
- PROBABLY WON'T WORK WITH TT OR SPECIAL MONITORS (uses
- line A to change fonts)!
-
- tmac.an new for version 1.2.1 nroff (-man macro package)
- tmac.s probably older version, what i use (-ms macro package)
-
- man.man nroff source manpage for man(1)
- man.1 formatted manpage for man(1)
- manpager.man nroff source manpage for manpager(1)
- manpager.1 formatted manpage for manpager(1)
- nroff.man nroff source manpage for nroff(1)
- nroff.1 formatted manpage for nroff(1)
- man.ma7 nroff source manpage for man(7)
- man.7 formatted manpage for man(7)
- ms.ma7 nroff source manpage for ms(7)
- ms.7 formatted manpage for ms(7)
-
- changes.121 changes to nroff v1.2.1
- readme you're looking at it
-
- For quick help, execute with "-help" switch:
-
- man -help
- manpager -help
- nroff -help
-
- For version info, execute with "-version" switch:
-
- man -version
- manpager -version
- nroff -version
-
- nroff now reads from stdin, so you will have to give it a ^C to exit here.
-
- To read the formatted manpages after you have unpacked this (and noting
- you will need a standard ST with mono monitor to run manpager), do:
-
- manpager nroff.1
- manpager man.1
- manpager manpager.1
- manpager man.7
- manpager ms.7
-
- manpager works like less. Exit with "q". manpager can only read one file
- at a time (can't do "manpager *.1"). it is usually only invoked by man.
-
- See changes.121 file for changes since last rev. Main things are addition
- of hyphenation (.nh, .hy but no \% yet) and .tm (write to stderr). Some
- bug fixes, too.
-
- man has been revamped, but I don't have a changes file. Mostly bugs have
- been fixed, port to gcc, and -m/-M change (see below and manpage).
-
- manpager is also basically the same. I have added some support specific
- to my environment that you will probably never see. For example, manpager
- understands _^H sequences (underline). This nroff does not generate these
- (unix nroff does). This is automatically detected. I think that was the
- only change, other than port to gcc.
-
- Note: the biggest problem with this nroff is that the macro package for
- man (-man, tmac.an) does NOT have a .TP macro. You will have to convert
- manpages that use .TP to instead use .IP:
-
- .TP
- tag
- text...
-
- becomes:
-
- .IP "tag"
- text...
-
- and
- .TP
- .B tag
- text...
-
- becomes:
-
- .IP "\fBtag\fR"
- text...
-
- and
-
- .TP 5
- tag
- text...
-
- becomes
-
- .IP "tag" 5
- text...
-
- The result will be something like:
-
- tag
- text....
-
- The tag is always on a seperate line, no matter how short it is.
-
- For some reason \fP does not work correctly either, so use \fR instead. I
- have formatted literally hundreds of manpages with nroff, and I 95% or any
- problems deal with .TP and \fP. Some day I'll add diversions so .TP can
- be supported. In the meantime, get out your editor and make these changes.
-
- I use MiNT (0.94) and run the tcsh (thanks again, eric!). I have the following
- in my tcsh.rc file:
-
- setenv PAGER c:\usr\bin\less.ttp
- setenv MANPAGER d:\usr\ucb\manpager.ttp
- setenv MANDIR d:\usr\man
- setenv MANPATH d:\usr\man
- setenv TMACDIR c:\lib\tmac
- setenv TMPDIR h:\tmp
- setenv TEMP h:\tmp
-
- This configures nroff and man:
-
- MANPAGER
- PAGER man looks first for MANPAGER as the pager. if not
- found, it looks for PAGER. if neither are found,
- it uses an internal default pager.
-
- MANDIR
- MANPATH man looks for manpage directories rooted in this
- directory. you should create files $MANPATH/man[1-8]
- there and put FORMATTED manpages there (man does
- NOT invoke nroff!)
-
- TMACDIR nroff looks for files here (ie -man on command line
- has nroff look for file $TMACDIR/tmac.an)
-
- TMPDIR
- TEMP so far these are not used (but may be in future).
- many other programs do use temp files and this is
- where they go.
-
- After you do this, copy tmac.an and tmac.s to $TMACDIR:
-
- cp tmac.* $TMACDIR
-
- mkdir $MANPATH/{man1,man2,man3,...,man8} and move FORMATTED manpages
- to these directories. A manpage has a name xxx.n where n is one of these
- numbers [1-8]:
-
- cp *.1 $MANPATH/man1
- cp *.7 $MANPATH/man7
-
- Both man and manpager can handle compressed files, so you can also put
- xxx.nz files there:
-
- compress *.1 *.7
- cp *.1z $MANPATH/man1
- cp *.7z $MANPATH/man7
-
- Copy the executables to a suitable bin directory, e.g.:
-
- cp *.ttp c:/bin
-
- I only format manpages for reading with manpager. hence, I always invoke
- nroff with:
-
- nroff -T -man file.man > file.1
-
- You may want to make an alias:
-
- alias nroff nroff -T
-
- Note that there is a number register in tmac.an (O) to control the printing
- of page headers. It is currently set to 1 (meaning do NOT print headers, ie
- for online docs). If you want headers, change its value to 0 (zero).
-
- nroff's -T switch should always be used to format manpages for manpager.
- It causes (hardcoded) escape sequences for font changes to be output (see
- manpager docs). This will eventually be replaced with configurable device
- support (ie -Tdevice). If you don't specify -T, the default is to use vt52
- escapes for fonts (and the special chars \(xx are not supported).
-
- Example:
-
- You have a manpage named "cmd.1" from a unix system (in source form).
-
- 1) first rename it to avoid confusion. I prefer to call manpage source
- "cmd.man" and formatted manpages "cmd.1". On unix systems, there
- is a separate set of directories to store manpage source files
- ($MANPATH/man[1-8]) and formatted files ($MANPATH/cat[1-8]).
- I don't keep manpage source online.
-
- mv cmd.1 cmd.man
-
- 2) format it:
-
- nroff -man -T cmd.man >cmd.1
-
- 3) preview it:
-
- man -m . cmd.1
-
- 4) store it:
-
- cp cmd.1 $MANPATH/man1
-
- 5) view it:
-
- man cmd
-
- Man also supports switches to allow you to override the $MANPATH. This is
- helpful for previewing newly formatted manpages in the current directory
- before they are permanently installed. See -M and -m switches (-M path
- specifies alternate $MANPATH, complete with subdirectories; -m path
- specifies absolute path where the file is, ie no path/man1/xxx.1).
-
- I am not sure of the state of -k and -f support in man(1) (ie reading
- a whatis database). I am working on a whatis(1) and apropos(1) anyway.
-
- Finally, a word on conventions. The sections of the manual are based on
- the unix programmer's manual:
-
- section directory description
-
- 1 $MANPATH/man1 commands (eg ls(1))
- 2 $MANPATH/man2 system calls (eg open(2))
- 3 $MANPATH/man3 library routines (eg fopen(3))
- 4 $MANPATH/man4 devices/drives/hardware
- 5 $MANPATH/man5 special files (eg termcap(5))
- 6 $MANPATH/man6 games
- 7 $MANPATH/man7 misc
- 8 $MANPATH/man8 sys admin tools (eg reboot(8))
-
- enjoy...
-
- -Bill Rosenkranz
- rosenkra@convex.com
-
-